#ifndef _TERRAIN
#define _TERRAIN

#include <d3d10.h>
#include <d3dx10.h>

#include "terrainCuda.h"
#include "drawableObject.h"


#define lerp(t, a, b) ( a + t * (b - a) )


class Terrain
{
private:

	int						m_size;
	float					m_scale;
	ID3D10Device*			pd3dDevice;
	DrawableObject*			m_TerrainObject;
	float **				m_HeightMap;


public:


	Terrain(ID3D10Device* d, int m_size, float scale);
	~Terrain();
	HRESULT generate();
	void render();
	DrawableObject * GetTerrain();
	float GetHeight(float x, float y);



};

#endif